package com.third.bank.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.third.bank.common.IdCardLoginCommon;
import com.third.bank.common.PhoneLoginCommon;
import com.third.bank.common.UserCommon;
import com.third.bank.entity.User;
import com.third.bank.util.BaseResponse;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * 客户表service
 */
public interface UserService extends IService<User> {
    User getUserByCardId(Long cardId);

    /**
     * 判断银行卡是否已经使用
     * @return
     */
    public boolean judgeExistIdCard(String idCard);

    /**
     * 判断手机号是否已经使用
     * @return
     */
    public boolean judgeExistPhone(String phone);

    /**
     *
     * 根据银行卡号查询用户
     */
    User searchUserbycard(String userBankcard);

    /**
     *
     * 根据身份证号查询用户
     * @return
     */
    public User searchUserbyIdcard(String userIdCard);

    /**
     * 注册客户
     * @param userCommon
     * @return
     */
    BaseResponse registerUser(UserCommon userCommon);



    /**
     *
     * 根据手机号查询用户
     * @return
     */
    public User searchUserByPhone(String phone);

    /**
     * 手机号登陆
     * @return
     */
    public BaseResponse phoneLogin(PhoneLoginCommon phoneLoginCommon);

    /**
     * 身份证登陆
     * @return
     */
    public BaseResponse idCardLogin(IdCardLoginCommon idCardLoginCommon);

    /**
     * 修改用户网银密码
     * @return
     */
    public BaseResponse updateLgPassword(String token , String idCard , String lgPassword);

    /**
     * 用户登出
     * @return
     */
    public BaseResponse logout(String token);
}
